package com.fc.gwt.client.header.menu.items;

import com.fc.gwt.client.services.RegistrationServiceGwt;
import com.fc.gwt.client.services.RegistrationServiceGwtAsync;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.PopupPanel;

/**
 * 
 * @author acs
 *
 */
public class RegistrationMenu extends MenuItem {
	private final RegistrationServiceGwtAsync registrationService = GWT.create(RegistrationServiceGwt.class);
	
	public RegistrationMenu() {
		super("Registration"); /* TODO externalize */
		addClickHandler(new RegistrationPopupHandler());
	}
	
	private static class RegistrationPopupHandler implements ClickHandler {
		private PopupPanel registrationPopup = new RegistrationPopup();
		
		@Override
		public void onClick(ClickEvent event) {
			registrationPopup.show();
		}
	}
}
